<ng-container *ngIf="!outlet.isActivated">
    <div class="toolbar">
        <div class="input-group mb-3">
            <div class="input-group-prepend">
                <span class="input-group-text bg-white">部门名称</span>
            </div>
            <input [(ngModel)]="search.params.departmentName" type="text" class="form-control" placeholder="请输入部门名称">
        </div>
        <div class="row">
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend">
                        <span class="input-group-text bg-white">共查询到</span>
                    </div>
                    <input type="text" value="{{pagination.total}}" class="form-control text-center bg-white" readonly placeholder="0">
                    <div class="input-group-append">
                        <span class="input-group-text bg-white">条/结果</span>
                    </div>
                </div>
            </div>
            <div class="col-6 text-right m-btn">
                <button class="btn btn-success" (click)="showEditModal()">
                    <span>新增</span>
                </button>
                <button (click)="doReset()" class="btn btn-white">
                    <i class="iconfont icon-refresh mr-2"></i>
                    <span>重置</span>
                </button>
                <button (click)="doSearch()" class="btn btn-white">
                    <i class="iconfont icon-search mr-2"></i>
                    <span>搜索</span>
                </button>
            </div>
        </div>
    </div>
    <div class="card rounded-0 ">
        <div class="card-body">
            <div class="table-responsive">
                <table class="table table-striped">
                    <tbody>
                        <tr class="font-weight-bolds bg-lights" style="text-align: center">
                            <td *ngFor="let th of theads">{{th}}</td>
                        </tr>
                        <!-- <tr class="font-weight-bolds bg-lights" *ngIf="auth.user.roleId==18||auth.user.roleId==20" style="text-align: center">
                            <td *ngFor="let th of one">{{th}}</td>
                        </tr> -->
                        <tr *ngFor="let td of list;index as i" style="text-align: center;color: #959595 !important">
                            <td>{{td.id}}</td>
                            <td>{{td.departmentName}}</td>
                            <td>{{td.departmentNumber}}</td>
                            <td>{{td.sortNumber}}</td>
                            <td>{{td.note}}</td>
                            <td>
                                <span (click)="del(td.id, td.status)" tsTip="删除" class="btn-icon btn-icon-danger">
                                    <i tsIcon="delete"></i>
                                </span>
                                <span tsTip="详情/编辑" class="btn-icon btn-icon-info" (click)="showEditModal(td)">
                                    <i tsIcon="edit"></i>
                                </span>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div class="text-right">
                <ts-pagination (pageChange)="loadDatas()" [pagination]="pagination" [items]="[{text:'显示 5 条',value:5},{text:'显示 10 条',value:10},{text:'显示 20 条',value:20}]"
                    [color]="global.getValue('color')" goTitle="跳转" prevTitle="上一页" nextTitle="下一页" startTitle="首页" endTitle="末尾"
                    outline></ts-pagination>
            </div>
        </div>
    </div>
</ng-container>

<router-outlet #outlet="outlet"></router-outlet>